import os
from glob import glob
from tqdm import tqdm

if __name__=='__main__':
    src_dir='/media/wsl/a9f0161f-7971-c843-8c81-c68049a0235a/PublicDataSet/Plate/train/'
    files=glob(src_dir+'/*g')
    with open('/media/wsl/a9f0161f-7971-c843-8c81-c68049a0235a/PublicDataSet/Plate/train.txt','w') as f:
        for file in tqdm(files):
            lab=os.path.basename(file).split('.')[0].split('_')[1]
            f.write(file+'\t'+lab+'\n')
